<template>
  <div class="welcome-guide">
    <div class="background-animation">
      <div class="floating-shapes">
        <div class="shape shape-1"></div>
        <div class="shape shape-2"></div>
        <div class="shape shape-3"></div>
        <div class="shape shape-4"></div>
      </div>
    </div>
    
    <div class="guide-content">
      <div class="logo-section">
        <div class="logo">
          <img src="/icons/doctor.svg" alt="医疗助手" class="logo-icon">
          <div class="logo-glow"></div>
        </div>
        <h1 class="app-title">智慧医疗助手</h1>
        <p class="app-subtitle">您的专属健康管理伙伴</p>
      </div>

      <div class="features-preview">
        <div class="feature-item" v-for="(feature, index) in features" :key="index">
          <div class="feature-icon">{{ feature.icon }}</div>
          <div class="feature-text">
            <h3>{{ feature.title }}</h3>
            <p>{{ feature.description }}</p>
          </div>
        </div>
      </div>

      <div class="action-buttons">
        <button class="btn-primary" @click="startGuide">
          <span class="btn-text">开始体验</span>
          <span class="btn-icon">→</span>
        </button>
        <button class="btn-secondary" @click="skipGuide">
          跳过引导
        </button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const emit = defineEmits(['next', 'skip'])

const features = [
  {
    icon: '🏥',
    title: '智能问诊',
    description: '24小时在线，专业医疗咨询'
  },
  {
    icon: '📱',
    title: '便捷预约',
    description: '一键预约，省时省力'
  },
  {
    icon: '📊',
    title: '健康管理',
    description: '个人健康档案，科学管理'
  }
]

const startGuide = () => {
  emit('next')
}

const skipGuide = () => {
  emit('skip')
}
</script>

<style scoped lang="scss">
.welcome-guide {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.background-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-shapes {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
  
  &.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
  }
  
  &.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
  }
  
  &.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
  }
  
  &.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 1s;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

.guide-content {
  max-width: 450px;
  width: 100%;
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-section {
  margin-bottom: 50px;
}

.logo {
  position: relative;
  margin-bottom: 25px;
  display: inline-block;
}

.logo-icon {
  width: 90px;
  height: 90px;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 2;
  animation: pulse 2s ease-in-out infinite;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes glow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.app-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-subtitle {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 0;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.features-preview {
  margin-bottom: 50px;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  transform: translateX(0);
  
  &:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
  
  &:nth-child(1) { animation-delay: 0.2s; }
  &:nth-child(2) { animation-delay: 0.4s; }
  &:nth-child(3) { animation-delay: 0.6s; }
  
  animation: slideInRight 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feature-icon {
  font-size: 28px;
  margin-right: 18px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.feature-text {
  text-align: left;
  flex: 1;
}

.feature-text h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.feature-text p {
  margin: 0;
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.4;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-primary, .btn-secondary {
  padding: 18px 32px;
  border: none;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #667eea;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  
  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
  }
  
  &:active {
    transform: translateY(-1px);
  }
}

.btn-text {
  transition: transform 0.3s ease;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  
  &:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 480px) {
  .guide-content {
    padding: 0 20px;
  }
  
  .app-title {
    font-size: 28px;
  }
  
  .app-subtitle {
    font-size: 16px;
  }
  
  .feature-item {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .feature-icon {
    font-size: 24px;
    width: 45px;
    height: 45px;
  }
  
  .feature-text h3 {
    font-size: 16px;
  }
  
  .feature-text p {
    font-size: 14px;
  }
  
  .btn-primary, .btn-secondary {
    padding: 16px 28px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .app-title {
    font-size: 24px;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
  }
  
  .feature-icon {
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  .feature-text {
    text-align: center;
  }
}
</style> 